// import { IStationSkillDetail } from '@/app';
import { IStationSkillDetail } from '@/utils/interface';
import { request } from 'umi';


// 获取技能要求列表
export let selectSkillList = (stationVersionId:string , searchTitle : string )=>{
    return request('sxpt/skill/selectSkillList' , {
        params:{
            stationVersionId,
            searchTitle
        }
    })
}


// 添加技能要求,顶层默认parentID=0
export let inintSkill = (stationVersionId:string , parentId : string )=>{
    return request('sxpt/skill/inintSkill' , {
        method : 'POST',
        data : {
            stationVersionId,
            parentId
        }
    })
}


// 删除当前技能要求
export let deleteSkill = (skillId : string)=>{
    return request('sxpt/skill/deleteSkill' , {
        method : 'DELETE',
        params : {
            skillId
        }
    })
}



// 获取当前技能详情
export let getStationSkillDetail = (skillId:string)=>{
    return request(`sxpt/skill/selectSkillInfo/${skillId}`)
}


// 修改技能要求
export let putSkill = (data : IStationSkillDetail)=>{
    return request('sxpt/skill',{
        method : 'POST',
        data
    })
}